package com.ebring.shareEducation.service;


import com.ebring.shareEducation.bean.Institution;
import com.ebring.shareEducation.bean.InstitutionCode;
import com.ebring.shareEducation.bean.admin.InstitutionAll;
import com.ebring.shareEducation.utils.RspMsg;

import java.util.List;
import java.util.Map;

public interface InstitutionService {

	/**
	 * 添加下级机构和一级机构
	 * @param institution
	 * @param institutionId 当前机构的id,也是下级机构的父id
	 * @return
	 */
    RspMsg<Institution> insertInstitution(Institution institution);

    /**
     * 删除机构
     */
    RspMsg<Institution> deleteInstitution(String[] institutionId);

    /**
     * 修改机构
     */
    RspMsg<Institution> updateInstitution(Institution institution);

    /**
     * 查询机构
     */
    RspMsg<List<InstitutionAll>> select(String id, String name,String parentId,String institutionlevel);

    /**
     * 查询下级机构
     */
    /*RspMsg<Map> getLower(String instlevel);*/
    RspMsg<Map> getLower(String institutionId);

    RspMsg<Map> getLower1(String institutionId);

    /**
     * 查询上级机构
     */
    RspMsg<InstitutionAll> getParent(String institutionId);

    /**
     * 查询总行机构
     */

    RspMsg<List<Institution>> selectOne();
    
    /**
     * 根据用户机构id查询机构
     * @param institutionLevel 
     */
    RspMsg<List<InstitutionAll>> selectAll(String institutionId);

    /**
     * 查询所有机构级别
     * @return
     */
	RspMsg<List<InstitutionCode>> insertInstitutionCode(String institutionId);

	/**
	 * 添加平级机构
	 * @param institution
	 * @return
	 */
	RspMsg<Institution> insertSameInstitution(Institution institution);
}
